-- ϢReaderTableĽṹ
Drop Table ReaderTable;
CREATE  TABLE ReaderTable (ReaderId 	Char(7)  NOT NULL Primary Key,
Name 		Varchar(8) 		NOT NULL ,
UserName	Varchar(12)		NOT NULL,
Password		Varchar(12)		NOT NULL ,
Gender 		Char(2) ,
Unit 		Varchar(50) , 
Ident 		Varchar (10) ,
Number 		Integer 			NOT NULL,
Remark 		Varchar(500) );


-- ͼϢBookTableĽṹ
Drop Table BookTable;
CREATE  TABLE  BookTable (ISBN	Char(5) 	NOT NULL Primary Key,
BookName	Varchar(50) 		NOT NULL,
Editor		Varchar(8),
Publisher 	Varchar(50),
PubDate		DateTime,
BookIndex	Varchar(20),		
Price		Money,
Stutate 		Char(4) 			NOT NULL);


-- ԱϢLibrarianTableĽṹ
Drop Table LibrarianTable;
CREATE  TABLE  LibrarianTable (LibrarianId	 Char(5)	NOT NULL Primary Key,
Name 	Varchar(50)	NOT NULL,
Password	Varchar(12)	NOT NULL);


-- ϢBorrowingTableĽṹ
Drop Table BorrowingTable;
CREATE  TABLE  BorrowingTable(TaskId	int Identity(1000,1)  NOT NULL	Primary Key,
ReaderId			Char(7)		NOT NULL,
ReaderName		Varchar(8),
ISBN			Char(5)		NOT NULL,
BookName		Varchar(50),
Editor			Varchar(8),
BorrowDate		DateTime		NOT NULL,
ReturnDate		DateTime		NOT NULL,
LibrarianId		Char(5)		NOT NULL);
